﻿using System;
using System.Collections.Generic;
using System.Text;
using DotNet.Data;
using DotNet.Model;
using System.Data;
namespace DotNet.Business
{
	public class hotQuestionBll
	{
		hotQuestionDal hDal=new hotQuestionDal();

		#region 是否存在该记录
		/// <summary>
		/// 是否存在该记录
		/// </summary>
		public bool Exists(int hotQuestionID)
		{
			return hDal.Exists(hotQuestionID);
		}
		#endregion

		#region 获得数据列表
		/// <summary>
		/// 获得数据列表
		/// </summary>
		public IList<hotQuestion> GetModel()
		{
			return hDal.GetModel();
		}
		#endregion

		#region 根据标识列获得数据实体
		/// <summary>
		/// 根据标识列获得数据实体
		/// </summary>
		/// <param name="hotQuestionID">标识列</param>
		/// <returns></returns>
		public hotQuestion GetModel(int hotQuestionID)
		{
			return hDal.GetModel(hotQuestionID);
		}
		#endregion

		#region 修改信息
		/// <summary>
		/// 修改信息
		/// </summary>
		/// <param name="hotQuestion">实体</param>
		/// <returns></returns>
		public bool Update(hotQuestion hotquestion)
		{
			 return hDal.Update(hotquestion);
		}
		#endregion

		#region 删除信息
		/// <summary>
		/// 删除信息
		/// </summary>
		/// <param name="hotQuestionID">标识列</param>
		/// <returns></returns>
		public bool Delete(int hotQuestionID)
		{
			 return hDal.Delete(hotQuestionID);
		}
		#endregion

		#region 添加信息
		/// <summary>
		/// 添加信息
		/// </summary>
		/// <param name="hotQuestion">实体</param>
		/// <returns></returns>
		public bool Insert(hotQuestion hotquestion)
		{
			 return hDal.Insert(hotquestion);
		}
		#endregion

        #region 热门问题分页
        /// <summary>
        /// 热门问题分页
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        public DataTable pagingForHotQuestion(int pageIndex,int pageSize)
        {
            return hDal.pagingForHotQuestion(pageIndex, pageSize);
        }
        #endregion

        #region 获取热门问题数量
        /// <summary>
        /// 获取热门问题数量
        /// </summary>
        /// <returns></returns>
        public int getRecordCount() 
        {
           return hDal.getRecordCount();
        }
        #endregion
    }
}
